<template>
  <w-modal ref="WModal" title="添加用户" :successFunc="successFunc">
    <template v-slot:default>
      <a-form-item prop="pass" label="密码">
        <a-input
          v-decorator="['pass', { rules: [{ required: true, message: '请输入' }] }]"
          type="text"
          placeholder="密码"
        />
      </a-form-item>
    </template>
  </w-modal>
</template>

<script>
import { formCheckPass } from "@/utils/check";
import { Admin } from "@/config/api";
import WModal from "@/components/global/modal/form";
export default {
  name: "ComAdminAuthUserListPass",
  components: {
    WModal,
  },
  data() {
    return {
      userModel: null,
    };
  },
  methods: {
    /**
     * 显示
     */
    show(row) {
      this.userModel = row;
      this.$refs.WModal.show()
    },
    /**
     * 确定按钮点击
     */
    async successFunc(values) {
      await this.$wAxios.$put(
        `${Admin.auth.user.update}${this.userModel._id}`,
        values
      );
      this.$emit("reload");
    },
  },
};
</script>

<style scoped></style>
